﻿Public Class FrmTimKiemTheoSanPham

    Sub Tim()
        Dim sp As TimKiemSP_DTO = New TimKiemSP_DTO
        sp.sanpham = txtTimSP.Text
        If (rdoTimTheoMaSP.Checked = True) Then
            dgvTimSP.DataSource = TimKiemSP_DAO.selectByMaSP(sp)
        Else
            dgvTimSP.DataSource = TimKiemSP_DAO.selectByTenSP(sp)
        End If
    End Sub

    Private Sub btnTimSP_Click(sender As Object, e As EventArgs) Handles btnTimSP.Click
        Tim()
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Me.Close()
    End Sub

    Private Sub btnCapNhatPX_Click(sender As Object, e As EventArgs) Handles btnCapNhatPX.Click
        Dim frmcnttsp As New FrmCapNhatThongTinSanPham
        frmcnttsp.ShowDialog()
    End Sub
End Class